package com.ucampus.controller;


import com.ucampus.entity.welcome;
import com.ucampus.service.welcomeService;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 功能：
 * 作者： 启明星_Polaris
 * 日期：2025/1/10 下午3:31
 **/

@RestController
@RequestMapping("/welcome")
public class welcomeController {
    private final welcomeService service;

    // 构造器注入 service
    public welcomeController(welcomeService service) {
        this.service = service;
    }

    // 获取所有信息
    @GetMapping("/all")
    public List<welcome> getAllInformation() {
        return service.getAllInformation();
    }

    // 根据 mission 获取对应的 process
    @GetMapping("/process")
    public List<String> getProcessByMission(@RequestParam String mission) {
        return service.getProcessByMission(mission);
    }
}

